﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStandardItemModel>
#include <QItemSelectionModel>
#include "qsalaydelegate.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void initModel(const QStringList &list);

private slots:
    void on_action_open_triggered();

    void on_action_add_triggered();

    void on_action_insert_triggered();

    void on_action_del_triggered();

    void on_action_see_triggered();

    void on_action_save_triggered();



    void on_action_right_triggered();

    void on_action_center_triggered();

    void on_action_left_triggered();

    void on_action_bold_triggered(bool checked);

    void on_currentChanged(const QModelIndex &current, const QModelIndex &previous);


private:
    Ui::MainWindow *ui;
    QStandardItemModel*model;
    int colCount;
    QItemSelectionModel*selectionModel;

    QSalayDelegate salayDelegate;

};
#endif // MAINWINDOW_H
